﻿@model WindMill.Models.Estoque.Classe

@{
    ViewBag.Title = "Editar Classe";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


@section Scripts{

    @Scripts.Render("~/Content/plugins/form-multiselect/js/jquery.multi-select.min.js")
    @Scripts.Render("~/Content/plugins/quicksearch/jquery.quicksearch.min.js")
    @Scripts.Render("~/Content/plugins/form-typeahead/typeahead.min.js")
    @Scripts.Render("~/Content/plugins/form-select2/select2.min.js")
    @Scripts.Render("~/Content/plugins/form-autosize/jquery.autosize-min.js")
    @Scripts.Render("~/Content/plugins/jqueryui-timepicker/jquery.ui.timepicker.min.js")
    @Scripts.Render("~/Content/plugins/form-daterangepicker/daterangepicker.min.js")
    @Scripts.Render("~/Content/demo/demo-formcomponents.js")
    @Scripts.Render("~/Scripts/lookup-field.js")
}

@section styles{
    @Styles.Render("~/Content/plugins/form-select2/select2.css") 
    @Styles.Render("~/Content/plugins/form-multiselect/css/multi-select.css") 
    @Styles.Render("~/Content/plugins/jqueryui-timepicker/jquery.ui.timepicker.css") 
    @Styles.Render("~/Content/plugins/form-daterangepicker/daterangepicker-bs3.css") 
    @Styles.Render("~/Content/js/jqueryui.css") 
    @Styles.Render("~/Content/plugins/codeprettifier/prettify.css") 
    @Styles.Render("~/Content/plugins/form-toggle/toggles.css") 
}

@section options{
    <div class="options">
                <div class="btn-toolbar">           
                    <div class="btn-group hidden-xs">
                        <a href='@Url.Action("Index")' class="btn btn-muted dropdown-toggle" data-toggle='dropdown'><i class="icon-circle-arrow-left"></i><span class="hidden-xs hidden-sm hidden-md"> Cancelar</span> </span></a>                       
                    </div>                                        
                    <div class="btn-group hidden-xs">
                        <a href='#' class="btn btn-muted dropdown-toggle" data-toggle='dropdown'><i class="icon-print"></i><span class="hidden-xs hidden-sm hidden-md"> Imprimir</span> </span></a>                       
                    </div>                                      
                    <a href="#" class="btn btn-muted hidden-xs"><i class="icon-cog"></i></a>                
                </div>
    </div>
}
<div class="container">


    <div class="row">
        <div class="col-xs-12">
            <div class="panel panel-midnightblue">
                <div class="panel-heading"><h4>Classe</h4></div>
                <div class="panel-body">
                    <p>Preencha os todos os campos necessários para fazer o cadastro.</p>
                    @using (Html.BeginForm(null, null, FormMethod.Post, new Dictionary<string, object> { { "class", "form-horizontal row-border"},{"style","padding-left:10px"},{ "data-validate","parsley"}, {"id","validate-form"} }))
                    {
                        @Html.AntiForgeryToken()
                        @Html.ValidationSummary(true)    
                        <div class="form-group">                        
                            <div class="row">
                                <div class="col-xs-2">
                                    @Html.LabelFor(model => model.CodClasse, new { @class = "control-label" })
                                    @Html.EditorFor(model => model.CodClasse,new{ @isReadOnly = true})
                                    @Html.ValidationMessageFor(model => model.CodClasse)
                                </div>                
                                <div class="col-xs-2">
                                    @Html.LabelFor(model => model.NumClasse, new { @class = "control-label" })
                                    @Html.EditorFor(model => model.NumClasse, new {@required=true})
                                    @Html.ValidationMessageFor(model => model.NumClasse)
                                </div>                
                                <div class="col-xs-2">
                                    @Html.LabelFor(model => model.NumSubclasse, new { @class = "control-label" })
                                    @Html.EditorFor(model => model.NumSubclasse)
                                    @Html.ValidationMessageFor(model => model.NumSubclasse)
                                </div>
                                    <div class="col-xs-4">
                                    @Html.LabelFor(model => model.IndTipo, new { @class = "control-label" })
                                    @Html.DropDownList("IndTipo",(SelectList)ViewBag.IndTipos,"Selecione uma parada",new{@class="populate select2",@style="width:100%"})
                                    @Html.ValidationMessageFor(model => model.IndTipo)
                                </div>
                            </div>
                          
                            <div class="row">
                                <div class="col-xs-10">
                                    @Html.LabelFor(model => model.DescClasse, new { @class = "control-label" })
                                    @Html.EditorFor(model => model.DescClasse)
                                    @Html.ValidationMessageFor(model => model.DescClasse)
                                </div>           
                            </div>
                            <div class="row">
                                <div class="col-xs-2">
                                    @Html.LabelFor(model => model.PercComissao1, new { @class = "control-label" })
                                    @Html.EditorFor(model => model.PercComissao1)
                                    @Html.ValidationMessageFor(model => model.PercComissao1)
                                </div>                
                                <div class="col-xs-2">
                                    @Html.LabelFor(model => model.PercComissao2, new { @class = "control-label" })
                                    @Html.EditorFor(model => model.PercComissao2)
                                    @Html.ValidationMessageFor(model => model.PercComissao2)
                                </div>                
                                <div class="col-xs-2">
                                    @Html.LabelFor(model => model.ValCusto, new { @class = "control-label" })
                                    @Html.EditorFor(model => model.ValCusto)
                                    @Html.ValidationMessageFor(model => model.ValCusto)
                                </div>
                            </div>
       
                            <div class="row">
                                @Html.LookupFieldFor(model => model.CodRamo)
                            </div>
                            <div class="row">
                                @Html.LookupFieldFor(model => model.CodMensagem,Url.Action("Create"),Url.Action("Index"))
                            </div>
                            <div class="row">
                                @Html.LookupFieldFor(model => model.CodContaContabil)
                            </div>
                        </div>


                    }

                    <div>
                        @Html.ActionLink("Voltar", "Index")
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

